<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="./assets/styles/popup.css" rel="stylesheet" />

<script src="./assets/scripts/popup.js" type="text/javascript"></script>
<title>コントロールパネル</title>
<script type="text/javascript">
	$(function(){
		$('#category_select #content .preview a').unbind('click').live('click',function(){
			var p = $(this).closest("tr");
			var id = p.attr("id");
			var category_name = $(".tName",p).html();
			//var id = $(this).children().next().val();
			//var id = $(this).children().next().children().val();
			//alert("*" + id + "*");
			setS(id, category_name);
			parent.$.colorbox.close();
		});
	});
</script>
</head>
<body>
<div class="thisPopup" id="category_select">

<header>
	<h1><span>&nbsp;</span>カテゴリ選択</h1>
</header>

<section id="content">
<form name="fm">
	<table class="sortable">
    <thead>
        <tr>
			<th colspan="2">カテゴリ名</th>
        </tr>
    </thead>
    <tbody>
    {{foreach from=$data item=v}}
        <tr id ="{{$v.id}}">
			<td class="tName">{{$v.category_name}}</td><input type="hidden" name="id" value="{{$v.id}}" />
			<td class="preview" ><a href="javascript:;">セット</a></td>
        </tr>
    {{/foreach}}
    </tbody>
	</table>
</form>
</section>
</div>
</body>
</html>